﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AMS.DD35.DbLoader.Views;
using AMS.DD35.DbLoader.Models;

namespace AMS.DD35.DbLoader.Controllers
{
    class ClassFeatureController : EditorControllerBase, IClassFeatureController
    {
        private IClassFeatureModel _model;

        public ClassFeatureController()
        {
        }

        #region Initialization Methods
        protected override void InitializeFields()
        {
            // tightly couple here per MVC
            _model = new ClassFeatureModel();
            _browser = new BrowserDialog(this);
            _browser.NewButtonText = "New ClassFeature";
            _browser.Text = "ClassFeature Browser";

            IEnumerable<object> classFeatures = _model.GetClassFeatures();
            _browser.Populate(classFeatures);
        }

        protected override void LoadEditor()
        {
            // TODO: prep editor to be Editor
            // Get data
            // Load data into Editor
            ClassFeatureEditor editor = new ClassFeatureEditor(this);
            // other load methods

            _editor = editor;
        }

        protected override void PrepNewEditor()
        {
            // prep editor to be New
            ClassFeatureEditor editor = new ClassFeatureEditor(this);

            _editor = editor;
        }
        #endregion
    }
}
